import java.util.StringTokenizer;


public class StrTokDemo3 {

  public static void main(String[] args) {

    String a = "Hello, World|of|Java";
    StringTokenizer st = new StringTokenizer(a, ",|", true);
    while (st.hasMoreElements()) {
      System.out.println(st.nextElement());
    }
  }
}
